//
//  TPBaseTableViewCell.h
//  CloudAtCostPanel
//
//  Created by leonardo on 2017/2/19.
//  Copyright © 2017年 tanpengsccd. All rights reserved.
//

#import <UIKit/UIKit.h>

#import "TPUIKit.h"


typedef NS_ENUM(NSUInteger ,TPBaseTableViewCellState) {
    TPBaseTableViewCellState_Normal,
    TPBaseTableViewCellState_Left,
    TPBaseTableViewCellState_Right
};/**> cell's state */

typedef NS_ENUM(NSUInteger ,UtilityBtnsSide) {
    UtilityBtnsSide_Left,
    UtilityBtnsSide_right
};/**> Utility 类型 */
#pragma mark ------------
@protocol TPCellUtilityBtnsDelegate
- (void)tapCellItilityBtnsBtn:(UIView *) btn;
@end
#pragma mark ------------
@interface TPCellUtilityBtns : UIView
PRO_A id<TPCellUtilityBtnsDelegate> delegate;
//PRO_S NSArray <NSString *>* titles;
//PRO_S NSArray <UIColor *>* colors;
PRO_A CGFloat width_max;
PRO_A NSUInteger numberOfBtn;
- (instancetype)initWithTitles:(NSArray <NSString *> *)titles Colors:(NSArray <UIColor *> *)colors width:(CGFloat)width;

@end
#pragma mark ------------
@class TPBaseTableViewCell;
@protocol TPBaseTableViewCellDelegate <NSObject>
- (void)cell:(TPBaseTableViewCell *)cell indexPath:(NSIndexPath *)indexPath ChangeToState:(TPBaseTableViewCellState)state;
- (void)cell:(TPBaseTableViewCell *)cell indexPath:(NSIndexPath *)indexPath tapUtilityBtnsSide:(UtilityBtnsSide)side btnIndex:(NSUInteger )index;
@end
#pragma mark ------------
@interface TPBaseTableViewCell : UITableViewCell <UIGestureRecognizerDelegate>
PRO_A TPBaseTableViewCellState state;

//PRO_S TPCellUtilityBtns * leftBtns , * rightBtns;
PRO_S TPCellUtilityBtns * rightUtilityBtnsContainer,* leftUtilityBtnsContainer;
//PRO_S UIView * centerRightSpace ,* centerLeftSpace;
PRO_A id<TPBaseTableViewCellDelegate> delegate;
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier rightBtns:(TPCellUtilityBtns *)rBtns leftBtns:(TPCellUtilityBtns *)lBtns;
- (void)updateCellState:(TPBaseTableViewCellState )state OffSetAnimated:(BOOL)animated;
@end
